﻿using System;
using System.Collections.Generic;
using Ur;
using Sargon;

namespace Pixels
{
    class ScreenDebug : Sargon.State {

        Canvas myCanvas = new Canvas(30000f);

        public ScreenDebug() {
            register_method(Trigger.frame, render);
        }

        void render() {
            var txt = "FPS : " + Stats.frames_last_second.ToString() + "\n" + "Sprites : " + Stats.num_sprites.ToString();
            Render.canvas = myCanvas;
            var tspr = Render.textInBox(txt, new Rect(20, 20, 600, 200), true);
            tspr.horizontalAlign = Text.HAlign.left;
            tspr.verticalAlign = Text.VAlign.top;
        }

    }
}
